package com.syedu.day06.v2;

/**
 * description：
 * @author Administrator
 * @date 2022/3/15 11:03
 */
public class TestStudent {
    public static void main(String[] args) {
        //创建对象的本质就是调用构造方法
        Student s1 = new Student("jack",23);
        Student s2 = new Student("rose",21);

        Student[] students = {s1,s2};
        //遍历数组
        for(Student s : students){
            System.out.println(s.name + "," + s.age);
            s.study();
        }
    }
}